<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>js的for语句</title>
		<script>
			
			//1-100求和
			var sum = 0;
			for (var i = 1;i<=100;i++) {
				sum += i;
			}
			alert(sum);
		</script>
	</head>
	<body>
	</body>
</html>
